#ifndef ICONMANAGER_H
#define ICONMANAGER_H

#include <QObject>
#include <QThread>

class IconManager : public QObject
{
    Q_OBJECT
    Q_PROPERTY(qreal dpr READ dpr WRITE setDpr NOTIFY dprChanged FINAL)
public:
    explicit IconManager(QObject *parent = nullptr);

    void start();
    void stop();

    qreal dpr() const;
    void setDpr(qreal newDpr);

signals:
    void onRequest(QString url, QString objectName);
//    void onRequestMap(QVariantMap map);
//    void onRequestList(QVariantList list);
    void onRequestJson(QString json);

    void onRequested(QPixmap pixmap, QString objectName);

    void dprChanged();

private:
    QThread m_thread;
    qreal m_dpr;
};

#endif // ICONMANAGER_H
